package com.dcyao.musicserve.controller;

import com.dcyao.musicserve.common.R;
import com.dcyao.musicserve.domain.dto.ConsumerDTO;
import com.dcyao.musicserve.service.ConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/consumer")
public class ConsumerController {
    @Autowired
    private ConsumerService consumerService;
    @PostMapping("/login")
    public R loginStatus(@RequestBody ConsumerDTO adminRequest) {
        return consumerService.verityPasswd(adminRequest);
    }
    @PostMapping("/sign")
    public R addUser(@RequestBody ConsumerDTO adminRequest) {
        return consumerService.addUser(adminRequest);
    }
    @PostMapping("/updatePassword")
    public R updatePassword(@RequestBody ConsumerDTO adminRequest) {
        return R.success("登录成功");
    }
    @PostMapping("/detail")
    public R userOfId(@RequestParam int id) {
        return R.success("登录成功");
    }
}
